<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
     <div>
        <span>hello world</span>
        <span>hello world</span>
     </div>
</body>
<script>
       var ele = document.querySelector('div');
       //读取div内部内容
       console.log(ele.innerHTML);
       //修改div内部内容
       ele.innerHTML = 'hello js <span>hello js</span>'
</script>
</html>